Part Number Hot Search : 
DH0165D 14D751K XFL4020 ZTX104 EMK31 TEA15 GPTP3192 12122
Product Description
Full Text Search
 

To Download DS2704 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 of 18 011206 general description the DS2704 provides 1280 bits of eeprom data storage and a secure hash algorithm (sha) engine. the dallas 1-wire  interface enables serial communication on a single battery contact and the 64-bit unique serial number allows multidrop networking and identification of individual devices. the 1280-bit memory is organized as 5 pages of 32 bytes each and supports storage of battery cell characteristics, charging voltage, current, and temperature parameters, as well as battery pack manufacturing data. the eeprom pages are in circuit rewritable and can be individually locked to write protect data. the DS2704 employs the secure hash algorithm (sha-1) specified in the federal information publication 180-1 and 180-2, and iso/iec 10118-3. sha-1 provides a robust cryptographic solution to ensure battery packs or other peripherals have been manufactured by authorized sources. the DS2704 processes a host transmitted challenge and the 64- bit secret key stored on chip to produce a 160-bit response for transmission back to the host. the secret key is never transmitted between the battery and the host. application example li+ safety circuit DS2704 pack+ thm data pack- v dd dq v ss 150  4.7v 0.01  f 150  pin configuration dq 1 3 2 6 4 5 vss nc nc nc vdd 3mm 3mm tdfn (top view  pads on bottom) a 1.98 mm 1.73 b c 123 top side a1 mark ucsp (future availability) (top view  balls on bottom) features  secure challenge and response authentication using the sha-1 algorithm  five lockable 32-byte pages of eeprom  dallas 1-wire interface with standard and overdrive communications speeds  unique 64-bit serial number  compatible with ds2502 memory map and read function command  operates with v dd as low as 2.5v  tiny chip-scale ucsp and 3mm x 3mm tdfn packaging (pb-free) ordering information part temp range pin-package DS2704g+ -20  c to +70  c 6-tdfn DS2704g+t&r -20  c to +70  c DS2704g+ on tape-and-reel DS2704w -20  c to +70  c bare die DS2704 1280-bit eeprom with sha-1 authentication www.maxim-ic.com + denotes lead-free package. 1-wire is a registered trademark of dallas semiconductor.
DS2704: 1280-bit eeprom with sha-1 authentication 2 of 18 absolute maximum ratings voltage range on all pins, relative to v ss -0.3v to +6v operating temperature range -40c to +85c storage temperature range -55c to +125c soldering temperature see ipc/jedec j-std-020a specification stresses beyond those listed under ?absolute maximum ratings? may cause permanent damage to the device. these are stress rating s only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of t he specifications is not implied. exposure to the absolute maximum rating conditions for extended periods may affect device. recommended dc operating conditions (2.5v  v dd  5.5v, t a = -30c to +85c.) parameter symbol conditions min typ max units supply voltage v dd (note 1) 2.5 5.5 v data pin dq (note 1) -0.3 +5.5 v dc electrical characteristics (2.5v  v dd  5.5v, t a = -30c to +85c, typical values at v dd = 3.7v and t a = 25c.) parameter symbol conditions min typ max units i dd0 standby mode (note 4) 1 2  a communication mode using standard bus timing (note 5) 5 25  a i dd1 communication mode using overdrive bus timing (note 5) 25 75  a i dd2 computation mode 75 500  a active current i ddp programming mode 400 750  a input logic high: dq v ih (note 1) 1.5 v input logic low: dq v il (note 1) 0.6 v output logic low: dq v ol i ol = 4ma (note 1) 0.4 v pull-down current: dq i pd 1 3  a eeprom reliability specification (2.5v  v dd  5.5v, t a = -30  c to +85  c.) parameter symbol conditions min typ max units write endurance: eeprom data field n eec1 (note 2) 50,000 writes write endurance: secret eeprom n eec2 (note 2) 1,000 writes storage t ees (note 2, 3) 10 years ac electrical characteristics (2.5v  v dd  5.5v, t a = -30c to +85c) parameter symbol conditions min typ max units computation time t sha 15 ms eeprom copy time t eec (note 2) 10 ms
DS2704: 1280-bit eeprom with sha-1 authentication 3 of 18 ac electrical characteristics: 1-wire interface (2.5v  v dd  5.5v, t a = -30  c to +85  c.) parameter symbol conditions min typ max units standard bus timing time slot t slot 60 120  s recovery time t rec 1  s write 0 low time t low0 60 120  s write 1 low time t low1 1 15  s read data valid t rdv 15  s reset time high t rsth 480  s reset time low t rstl 480 960  s presence detect high t pdh 15 60  s presence detect low t pdl 60 240  s overdrive bus timing time slot t slot 6 16  s recovery time t rec 1  s write 0 low time t low0 6 16  s write 1 low time t low1 1 2  s read data valid t rdv 2  s reset time high t rsth 48  s reset time low t rstl 48 80  s presence detect high t pdh 2 6  s presence detect low t pdl 8 24  s dq capacitance c dq 60 pf note 1: all voltages are referenced to v ss . note 2: eeprom programming temperature range limited to 0  c to 50  c. note 3: device written n eec times then stored for t ees at 50  c. note 4: dq = vdd. note 5: current measured with minimum bus timing while the master issues: 1-wire reset, skip rom, write challenge, write repeated 0?s until end of measurement.
DS2704: 1280-bit eeprom with sha-1 authentication 4 of 18 pin description pin symbol function 6 dq serial interface data i/o pin. bi-directional data transmit and receive at 16kbps or 143kbps 5 vss supply gnd and reference for serial communication. attach vss to battery pack negative terminal 1 vdd supply input. bypass to vss with 0.01  f typical 2, 3, 4 nc no connection figure 1. block diagram eeprom status data field 1-wire interface memory control crc generator dq vss sha-1 algorithm, constants and w0- w15, a-e registers vdd multi-stage charge pump 64 bit rom id vpp eeprom memory data field 5 page x 32 byte (1280 bit) 64 bit secret dout? din detailed description the DS2704 is comprised of an eeprom memory array and sha-1 authentication function that are accessed via a 1-wire interface. the 1-wire interface controls access by a host system to the 64-bit net address (rom id), sha-1 authentication, 1280-bit eeprom memory and eeprom status. the DS2704 operates in one of four modes: standby, communication, computation and programming. standby mode is the default mode of operation. whenever any task has been completed, the ic will automatically return to standby mode. standby mode is also directly entered if dq is low for a period of t rstl . once standby mode has been entered, dq can be returned to logic high and standby mode is retained. most operations are performed in communication mode, with the host system addressing the DS2704 using net address commands and then retrieving eeprom and status data using memory function commands or setting up an authentication exchange and retrieving the results. the supply current, i dd1 , varies depending on bus activity, communication direction, and selection of standard or overdrive bus timing. in sha-1 computation mode, the supply current increases to i dd2 for a period of t sha . the computation mode load current occurs after the last bit of one of the compute mac function commands is sent.
DS2704: 1280-bit eeprom with sha-1 authentication 5 of 18 programming mode is entered when writing the nonvolatile memory portions of the DS2704. the supply current increases to i ddp for t eec when a copy scratchpad, write status, compute secret, clear/lock secret or clear/set overdrive timing command is executed. functional compatibility has been maintained between the ds2502 and DS2704 at the net address/rom command and function command levels for reading the memory and status data fields. since the DS2704 is based on eeprom technology versus the eprom technology used for the ds2502, writing of the memory and status data fields is not the same as the ds2502. the DS2704 includes an on-chip charge pump to facilitate in- circuit programming. the need to apply an external high voltage programming pulse during pack manufacture is therefore eliminated. data can be written to a 0 or 1 value up to n eec times in the DS2704. the ability to reprogram the data in the eeprom pages makes the page address redirection bytes in the status data field unnecessary. therefore, the DS2704 maintains them for ds2502 read compatibility but they cannot be modified from their factory default values of ffh. authentication authentication is performed using a fips-180 compliant sha-1 one way hash algorithm on a 512-bit message block. the message block consists of a 64-bit secret, a 64-bit challenge and 384 bits of constant data. optionally, the 64-bit net address replaces 64 of the 384 bits of constant data used in the hash operation. contact dallas/maxim for details of the message block organization. the host and the DS2704 both calculate the result based on the mutually known secret. the result data, known as the message authentication code (mac) or message digest, is returned by the DS2704 for comparison to the host?s result. note that the secret is never transmitted on the bus and thus cannot be captured by observing bus traffic. each authentication attempt is initiated by the host system by providing a 64-bit random challenge via the write challenge command. the host then issues the compute mac or compute mac with rom id command. the mac is computed per fips 180, and then returned as a 160-bit serial stream, beginning with the least significant bit. DS2704 authentication commands write challenge [0ch]. this command writes the 64-bit challenge to the DS2704. the lsb of the 64-bit data argument can begin immediately after the msb of the command has been completed. if more than 8 bytes are written, the final value in the challenge register will be indeterminate. the write challenge command must be issued prior to every compute mac or compute next secret command for reliable results. compute mac without rom id [36h]. this command initiates a sha-1 computation based on the challenge value and internal secret. logical 1?s are loaded in place of the rom id. this command allows the use of a master secret and mac response independent of the rom id. the DS2704 computes the mac in t sha after receiving the last bit of this command. after the mac computation is complete, the host must write 8 write zero time slots and then issue 160 read time slots to receive the 20-byte mac. see figure 7 on page 16 for command timing. compute mac with rom id [35h] this command is structured the same as the compute mac without rom id, except that the rom id is included in the message block. with the rom id unique to each DS2704 included in the mac computation, use of a unique secret in each token and a master secret in the host device is allowed. see application note ?white paper 4?, available at http://www.maxim-ic.com , for more information. see figure 7 on page 16 for command timing. note : immediately after power-up, a dummy compute mac command is required to initialize the DS2704. if the dummy command is not issued, the first authentication attempt is computed using a challenge value of 0. when issuing the dummy compute mac command, the command sequence can be terminated immediately following the 8 th bit of the compute mac command byte. waiting for the sha-1 computation and reading the results back are not required. sha-1 related commands used while authenticating a battery or peripheral device are summarized in table 1 for convenience. four additional commands for clearing, computing and locking of the secret are described in detail in the following section.
DS2704: 1280-bit eeprom with sha-1 authentication 6 of 18 table 1. authentication function commands command hex function write challenge 0c writes 64-bit challenge for sha-1 processing. required prior to issuing compute mac and compute next secret commands. compute mac without rom id and return mac 36 computes hash the message block with logical 1?s in place of the rom id. returns the 160-bit mac. compute mac with rom id and return mac 35 computes hash of the message block including the rom id. returns the 160-bit mac. secret management function commands clear secret [5ah]. this command sets the 64-bit secret to all 0?s (0000 0000 0000 0000h). the host must wait t eec for the DS2704 to write the new secret value to eeprom. see figure 10 on page 18 for command timing. compute next secret without rom id [30h]. this command initiates a sha-1 computation of the mac and uses a portion of the resulting mac as the next or new secret. the mac computation is performed with the current 64-bit secret and the 64-bit challenge. logical 1?s are loaded in place of the rom id. 64-bits of the output mac are used as the new secret value. the host must allow t sha after issuing this command for the sha calculation to complete, then wait t eec for the DS2704 to write the new secret value to eeprom. see figure 8 on page 17 for command timing. compute next secret with rom id [33h]. this command initiates a sha-1 computation of the mac and uses a portion of the resulting mac as the next or new secret. the mac computation is performed with the current 64-bit secret, the 64-bit rom id and the 64-bit challenge. 64-bits of the output mac are used as the new secret value. the host must allow t sha after issuing this command for the sha calculation to complete, then wait t eec for the DS2704 to write the new secret value to eeprom. see figure 8 on page 17 for command timing. lock secret [6ah]. this command write protects the 64-bit secret to prevent accidental or malicious overwrite of the secret value. the secret value stored in eeprom becomes "final." the host must wait t eec for the DS2704 to write the lock secret bit to eeprom. see figure 10 on page 18 for command timing. table 2. secret loading function commands command hex function clear secret 5a clears the 64-bit secret to 0000 0000 0000 0000h compute next secret without rom id 30 generates new global secret compute next secret with rom id 33 generates new unique secret lock secret 6a sets lock bit to prevent changes to the secret 1-wire speed control function commands clear overdrive [8dh]. this command selects the standard 1-wire timings shown in the electrical characteristics table. the setting is stored in eeprom so that the programmed speed selection can be recalled on initial power up. the host must wait t eec for the DS2704 to write the eeprom. see figure 10 for command timing. standard 1-wire timing is the factory default. set overdrive [8bh]. this command selects the overdrive 1-wire timings shown in the electrical characteristics table. the setting is stored in eeprom so that the programmed speed selection can be recalled on initial power up. the host must wait t eec for the DS2704 to write the eeprom. see figure 10 for command timing.
DS2704: 1280-bit eeprom with sha-1 authentication 7 of 18 table 3. 1-wire speed control function commands command hex function set overdrive 8b sets 1-wire interface timings to overdrive. clear overdrive 8d sets 1-wire interface timings to standard. (factory default) eeprom memory the DS2704 has a linear address space for access to the eeprom data field. the read memory and read data/generate crc memory function commands provide ds2502 legacy read access to the lower 1024 bits of the eeprom data field. read access to the entire eeprom data field is provided by the readall function command. the write scratchpad, read scratchpad and copy scratchpad function commands provide write access to the eeprom data field. the eeprom memory is organized as 5 pages of 32 bytes each as shown in table 4. eeprom data field. all pages are read and write (r/w) accessible. when received from the factory, the entire 1280-bit eeprom data field appears as logical 1?s. table 4. eeprom data field address (hex) description read/write 0000 ? 001f page 0 (32 bytes) r/w* 0020 ? 003f page 1 (32 bytes) r/w* 0040 ? 005f page 2 (32 bytes) r/w* 0060 ? 007f page 3 (32 bytes) r/w* 0080 ? 009f page 4 (32 bytes) r/w* 00a0 ? ffff reserved * writing requires programming delay of t eec read memory [f0h] the read memory command is used to read data from the lower 1024 bits (page 0 to page 3) of the 1280-bit eeprom data field. the bus master follows the command byte with a 2-byte address (ta1=(t7:t0), ta2=(t15:t8)) that indicates a starting byte location within the data field. an 8-bit crc of the command byte and address bytes is computed by the DS2704 and read back by the bus master to confirm that the correct command word and starting address were received. if the crc is deemed to be incorrect by the bus master, a reset pulse should be issued and the entire sequence repeated. if the crc is deemed to be correct by the bus master, read time slots can be issued to receive data from the eeprom data field starting at the initial address. the bus master can issue a reset pulse at any point or continue to issue read time slots until the end of page 3 of the data field is reached. if reading continues through the end of page 3, the bus master can issue eight additional read time slots and the DS2704 will respond with a 8-bit crc of all data bytes read from the initial starting byte through the last byte of page 3. terminating the command transaction with a reset pulse prior to reaching the end of page 3 results in a loss of availability of the 8-bit crc. read data/generate 8-bit crc [c3h] the read data/generate 8-bit crc command is used to read data from the lower 1024 bits (page 0 to page 3) of the 1280-bit eeprom data field. the bus master follows the command byte with a 2-byte address (ta1=(t7:t0), ta2=(t15:t8)) that indicates a starting byte location within the data field. an 8-bit crc of the command byte and address bytes is computed by the DS2704 and read back by the bus master to confirm that the correct command word and starting address were received. if the crc is deemed to be incorrect by the bus master, a reset pulse should be issued and the entire sequence repeated. if the crc is deemed to be correct by the bus master, read time slots can be issued to receive data from the eeprom data field starting at the initial
DS2704: 1280-bit eeprom with sha-1 authentication 8 of 18 address. the bus master can issue a reset pulse at any point or continue to issue read time slots until the end of the 32-byte page is reached. if reading occurs through the end of the 32-byte page, the bus master can issue eight additional read time slots and the DS2704 will respond with a 8-bit crc of all data bytes read from the initial starting byte through the last byte of the current page. after the crc is received, additional read time slots return data starting with the first byte of the next page. this sequence will continue until the bus master reads page 3 and its accompanying crc. thus each page of data can be considered to be 33 bytes long: the 32 bytes of user- programmed eeprom data and an 8-bit crc that gets generated automatically at the end of each page. the read data/generate 8-bit crc command sequence can be exited at any point by issuing a reset pulse. read all [65h] the read all command is used to read data from all 1280 bits (page 0 ? page 4) of the eeprom data field. this includes page 0 ? page 3 which are accessible via the ds2502 read memory and read data/gen crc legacy commands and page 4 which is only accessible using the read all command. the bus master follows the command byte with a 2-byte address (ta1=(t7:t0), ta2=(t15:t8)) that indicates a starting byte location within the data field. an 8-bit crc of the command byte and address bytes is computed by the DS2704. the bus master must issue 8 read time slots to receive the crc value, and then issue additional read time slots to receive data from the DS2704 starting at ta2:ta1. when reading begins within the eeprom data field (0000h ? 009fh) and continues past 009fh, an 8 bit crc of all data returned is computed by the DS2704 and returned following the last byte of the data field. if reading begins in the reserved range or time slots are issued after receiving the 8 bit crc, the DS2704 returns logical 1?s. write scratchpad [6ch] the write scratchpad command is used to write up to 8-bytes to the scratchpad buffer which is in turn used to program 1280-bit eeprom data field via the copy scratchpad command. the bus master issues the write scratchpad function command followed by a 1-byte address argument that depicts the starting byte position in the scratchpad of the following byte stream to be written. the valid range for the address is 00h ? 07h. the address is auto-incremented after each data byte is written. when the address is greater than 07h, no further bytes will be accepted. incomplete bytes are not written to the scratchpad. the write scratchpad command fills the scratchpad lsbyte first, so when fewer than 8 bytes are written, the upper bytes of the scratchpad buffer contain data from previous operations. since the copy scratchpad command transfers the entire scratchpad to the eeprom data field, incomplete writing of the scratchpad should be done with caution. if the master determines the scratchpad data is unsuitable to copy to the eeprom, the entire write sequence (command and data) must be repeated after issuing a reset pulse. read scratchpad [69h] the read scratchpad command is used to return scratchpad data if verification of the scratchpad data is required prior to programming the eeprom data field. the bus master issues the read scratchpad function command followed by a 1-byte address argument that depicts the starting byte position in the scratchpad of the first byte to be read. the valid range for the address is 00h ? 07h. the address is auto-incremented after each data byte is read. when the address is greater than 07h, any further reads will return bit values of 1. the DS2704 returns up to 64 bits from the scratchpad beginning with the least significant bit of the least significant byte. copy scratchpad [48h] the copy scratchpad function command is used to transfer data from the 8-byte scratchpad buffer to the eeprom data field memory. transfers are aligned on 8 byte boundaries. the bus master issues the copy scratchpad function command followed by the 2-byte target address (ta1=(t7:t0), ta2=(t15:t8)). the DS2704 aligns target addresses to the least significant byte (lsbyte) of each eight byte boundary by zeroing the three least significant bits of ta1. that is, ta1[t2:t0] are set internally to 000b. as an example, issuing the copy scratchpad command with ta2:ta1 = 0x0020 or ta2:ta1 = 0x0027 results in the same 8-byte block being copied to page 1 beginning at address 0x0020. a delay of t eec is required to program the scratchpad contents to the eeprom array. see figure 9 for command timing.
DS2704: 1280-bit eeprom with sha-1 authentication 9 of 18 eeprom status the DS2704 has a separate 8-byte linear address space for access to the eeprom status data field using the read status and write status function commands. read status [aah] the read status command is used to read data from the eeprom status data field. the bus master follows the command byte with a 2-byte address (ta1=(t7:t0), ta2=(t15:t8)) that indicates a starting byte location within the data field. an 8-bit crc of the command byte and address bytes is computed by the DS2704 and read back by the bus master to confirm that the correct command word and starting address were received. if the crc is deemed to be incorrect by the bus master, a reset pulse should be issued and the entire sequence repeated. if the crc is deemed to be correct by the bus master, read time slots can be issued to receive data starting at the initial address. the bus master can issue a reset pulse at any point or continue to issue read time slots until the end of the eeprom status data field is reached. if reading occurs through the end of the eeprom status data field, the bus master can issue eight additional read time slot s and the DS2704 will respond with a 8-bit crc of all data bytes read from the initial starting byte through the last byte. additional read time slots return logical 1?s. the read status command sequence can be ended at any point by issuing a reset pulse. table 5. eeprom status field address (hex) description read/write 0000 write protect page bits b0: page 0 write protect b1: page 1 write protect b2: page 2 write protect b3: page 3 write protect b4: page 4 write protect b5: reserved for tmex b6: reserved for tmex b7: reserved for tmex r/w* 0001 factory programmed to ffh r 0002 factory programmed to ffh r 0003 factory programmed to ffh r 0004 factory programmed to ffh r 0005-0006 reserved r 0007 factory programmed to 00h r * one time write to ?0? write status [55h] the write status command is used to program the eeprom status data field. only the write protect page bits at address 0000h are writable. the other bytes are factory programmed to the values in table 5. the write protect page bits are set to logical 1?s when received from the factory. eeprom page data can be programmed multiple times until its associated write protect page bit is programmed to a logical 0. once a write protect page bit is programmed to a logical 0, it cannot be programmed back to a logical 1. programming a write protect page bit to a logical 0 prevents any future modification or overwriting of the data in the associated page. to protect page data from modification, the bus master writes the write status function command followed by one byte of status data containing the write protect page bits (b7:b0). the status data must be written least significant bit to most significant bit, that is b0 to b7. once the eighth bit of the status data is completed, the write operation cannot be undone. if the write operation is abandoned prior to completing the status data byte, the entire write sequence must be repeated after issuing a reset pulse.
DS2704: 1280-bit eeprom with sha-1 authentication 10 of 18 after the programming write delay (t eec ), the master can issue a read status function command to verify that the appropriate write protect page bits have been programmed. table 6. eeprom memory and status function commands command hex function read memory f0 read data from the lower 1024 bits of the 1280-bit eeprom memory data field. generates a crc value if read continues to end of the 4 th page. read data/generate crc c3 read data from lower 4 pages of the eeprom memory data field. generates a crc value of the data read from each page if read continues to the end of page. read all 65 read data from all 5 pages of the eeprom memory data field read status aa read data from the 8-byte eeprom status data field write status 55 write the page protection bits in the eeprom status data field write scratchpad 6c write up to 8 bytes of data to the scratchpad register read scratchpad 69 read up to 8 bytes of the scratchpad register data copy scratchpad 48 programs the scratchpad data to eeprom data field at the target address ta2:ta1 note : the read data, read data/generate crc and read status commands filter the target address (ta2:ta1) value with a 007fh and mask that limits the addressable size of the eeprom data field and eeprom status field to 1024 bits. target address values equal to or greater than 0080h (128 decimal) return data from the lower 128 bytes of the respective data field. it is also important to note that the filter is applied prior to calculation of the crc, so that target address values that are multiples of 128 return the same crc. the crc values should be considered correct only for ta2:ta1 = 0000h to 007fh. 1-wire bus system the 1-wire bus is a system that has a single bus master and one or more slaves. a multidrop bus is a 1-wire bus with multiple slaves, while a single-drop bus has only one slave device. in all instances, the DS2704 is a slave device. the bus master is typically a microprocessor in the host system. the discussion of this bus system consists of five topics: 64-bit net address, crc generation, hardw are configuration, transaction sequence, and 1-wire signaling. 64-bit net address (rom id) each DS2704 has a unique, factory-programmed 1-wire net address that is 64 bits in length. the term net address is synonymous with the rom id or rom code terms used in the ds2502 and other dallas 1-wire documentation. the first eight bits of the net address are the 1-wire family code (09h). the next 48 bits are a unique serial number. the last eight bits are a cyclic r edundancy check (crc) of the first 56 bits (see figure 2). the 64-bit net address and the 1-wire i/o circuitry built into the device enable the DS2704 to communicate through the 1-wire protocol detailed in this data sheet. figure 2. 1-wire net address format 8-bit crc 48-bit serial number 8-bit family code (09h) msb lsb
DS2704: 1280-bit eeprom with sha-1 authentication 11 of 18 crc generation the DS2704 has an 8-bit crc stored in the most significant byte of its 1-wire net address and generates a crc during some command protocols. to ensure error-free transmission of the address, the host system can compute a crc value from the first 56 bits of the address and compare it to the crc from the DS2704. the host system is responsible for verifying the crc value and taking action as a result. the DS2704 does not compare crc values and does not prevent a command sequence from proceeding as a result of a crc mismatch. proper use of the crc can result in a communicati on channel with a very high level of integrity. the crc can be generated by the host using a circuit consis ting of a shift register and xor gates as shown in figure 3, or it can be generated in software using the polynomial x 8 + x 5 + x 4 + 1. additional information about the dallas 1-wire crc is available in application note 27: understanding and using cyclic redundancy checks with dallas semiconductor touch memory products ( www.maxim-ic.com/appnoteindex ). in the circuit in figure 3, the shift register bits are initialized to 0. then, starting with the least significant bit of the family code, one bit at a time is shifted in. after the 8th bit of the family code has been entered, then the serial number is entered. after the 48th bit of the serial num ber has been entered, the shift register contains the crc value. figure 3. 1-wire crc generation block diagram during some command sequences, the DS2704 also generates an 8-bit crc and provides this value to the bus master to facilitate validation for the transfer of command, address, and data from the bus master to the DS2704. the DS2704 computes an 8-bit crc for the command and address bytes received from the bus master for the read memory, read status and read/generate crc commands to confirm that these bytes have been received correctly. the crc generator on the DS2704 is also used to provide verification of error-free data transfer as each eeprom page is sent to the master during a read data/generate crc command and for the 8 bytes of information in the status memory field. in each case where a crc is used for data transfer validation, the bus master must calculate the crc value using the same polynomial function and compare the calculated value to the crc either stored in the DS2704 net address or computed by the DS2704. the comparison of crc values and decision to continue with an operation are determined entirely by the bus master. there is no circuitry in the DS2704 that prevents the a command sequence from proceeding if the stored or calculated crc fr om the DS2704 and the calculated crc from the host do not match. hardware configuration because the 1-wire bus has only a single line, it is important that each device on the bus be able to drive it at the appropriate time. to facilitate this, each device attached to the 1-wire bus must connect to the bus with open-drain or tri-state output drivers. the DS2704 uses an open-drain output driver as part of the bidirectional interface circuitry shown in figure 4. if a bidirectional pin is not available on the bus master, separate output and input pins can be connected together. the 1-wire bus must have a pullup resistor at the bus-master end of the bus. a value of between 2k  and 5k  is recommended. the idle state for the 1-wire bus is high. if, for any reason, a bus transaction must be suspended, the bus must be left in the idle state to properly resume the transaction later. note that if the bus is left low for more than t rstl , slave devices on the bus begin to interpret the low period as a reset pulse, effectively terminating the transaction. msb xor xor lsb xor input
DS2704: 1280-bit eeprom with sha-1 authentication 12 of 18 figure 4. 1-wire bus interface circuitry vpullup rx tx rx rx = receive tx = transmit ~100 ohm mosfet bus master device 1-wire port (dq) 4.7k  tx ~1 ua transaction sequence the protocol for accessing the DS2704 through the 1-wire port is as follows:  initialization  net address command  function command(s)  data transfer (not all commands have data transfer) all transactions of the 1-wire bus begin with an initialization sequence consisting of a reset pulse transmitted by the bus master, followed by a presence pulse simultaneously transmitted by the DS2704 and any other slaves on the bus. the presence pulse tells the bus master that one or more devices are on the bus and ready to operate. for more details, see the 1-wire signaling section below. net address commands once the bus master has detected the presence of one or more slaves, it can issue one of the net address commands described in the following paragraphs. the name of each net address command (rom command) is followed by the 8-bit opcode for that command in square brackets. read net address [33h]. this command allows the bus master to read the DS2704?s 1-wire net address. this command can only be used if there is a single slave on the bus. if more than one slave is present, a data collision occurs when all slaves try to transmit at the same time (open drain produces a wired-and result). match net address [55h]. this command allows the bus master to specifically address one DS2704 on the 1-wire bus. only the addressed DS2704 responds to any subsequent function command. all other slave devices ignore the function command and wait for a reset pulse. this command can be used with one or more slave devices on the bus. skip net address [cch]. this command saves time when there is only one DS2704 on the bus by allowing the bus master to issue a function command without specifying the address of the slave. if more than one slave device is present on the bus, a subsequent function command can cause a data collision when all slaves transmit data at the same time. search net address [f0h]. this command allows the bus master to use a process of elimination to identify the 1-wire net addresses of all slave devices on the bus. the search process involves the repetition of a simple three- step routine: read a bit, read the complement of the bit, then write the desired value of that bit. the bus master performs this simple three-step routine on each bit location of the net address. after one complete pass through all 64 bits, the bus master knows the address of one device. the remaining devices can then be identified on additional iterations of the process. see chapter 5 of the book of ds19xx i button ? standards for a comprehensive discussion of a net address search, including an actual example ( www.maxim-ic.com/ibuttonbook ). i button is a registered trademark of dallas semiconductor.
DS2704: 1280-bit eeprom with sha-1 authentication 13 of 18 i/o signaling the 1-wire bus requires strict signaling protocols to ensure data integrity. the four protocols used by the DS2704 are as follows: the initialization sequence (reset pulse followed by presence pulse), write 0, write 1, and read data. the bus master initiates all these types of signaling except the presence pulse. the initialization sequence required to begin any communication with the DS2704 is shown in figure 5. a presence pulse following a reset pulse indicates that the DS2704 is ready to accept a net address command. the bus master transmits (tx) a reset pulse for t rstl . the bus master then releases the line and goes into receive mode (rx). the 1-wire bus line is then pulled high by the pullup resistor. after detecting the rising edge on the dq pin, the DS2704 waits for t pdh and then transmits the presence pulse for t pdl . figure 5. 1-wire initialization sequence write-time slots a write-time slot is initiated when the bus master pulls the 1-wire bus from a logic-high (inactive) level to a logic-low level. there are two types of write-time slots: write 1 and write 0. all write-time slots must be t slot in duration with a 1  s minimum recovery time, t rec , between cycles. the DS2704 samples the 1-wire bus line between t low1_max and t low0_min after the line falls. if the line is high when sampled, a write 1 occurs. if the line is low when sampled, a write 0 occurs. the sample window is illustrated in figure 6. 1-wire write and read time slots. for the bus master to generate a write 1 time slot, the bus line must be pulled low and then released, allowing the line to be pulled high less than t rdv after the start of the write time slot. for the host to generate a write 0 time slot, the bus line must be pulled low and held low for the duration of the write-time slot. read-time slots a read-time slot is initiated when the bus master pulls the 1-wire bus line from a logic-high level to a logic-low level. the bus master must keep the bus line low for at least 1  s and then release it to allow the DS2704 to present valid data. the bus master can then sample the data t rdv from the start of the read-time slot. by the end of the read- time slot, the DS2704 releases the bus line and allows it to be pulled high by the external pullup resistor. all read- time slots must be t slot in duration with a 1  s minimum recovery time, t rec , between cycles. see figure 6 and the timing specifications in the electrical characteristics table for more information. t r s tl t pdl t r s th t pdh pack+ pack- line type legend: bus master active low DS2704 active low resistor pullup both bus master and DS2704 active low dq
DS2704: 1280-bit eeprom with sha-1 authentication 14 of 18 figure 6. 1-wire write and read time slots write 0 slot write 1 slot t slot t low0 t slot t rec t low1 v pullup gnd device sample window min typ max 15  s 2  s 15  s 30  s 1  s 3  s device sample window min typ max 15  s 2  s 15  s 30  s 1  s 3  s overdrive standard mode >1  s read data slot data = 0 t slot 15  s t slot t rec v pullup gnd master sample window t rdv 15  s master sample window >1  s data = 1 overdrive standard mode 2  s 2  s line type legend: bus master active low device active low both bus master and device resistor pullup active low t rdv
DS2704: 1280-bit eeprom with sha-1 authentication 15 of 18 table 7. all function commands compatibility command hex function ds2502 ds2703 write challenge 0c writes 64-bit challenge for sha-1 processing. required prior to all compute mac and compute next secret commands. cc compute mac without rom id and return mac 36 computes hash of the message block with all 1?s in place of the rom id cc compute mac with rom id and return mac 35 computes hash of the message block using the rom id cc clear secret 5a clears the 64-bit secret to 0000 0000 0000 0000h. compute next secret without rom id 30 generates new global secret. np compute next secret with rom id 33 generates new unique secret. np lock secret 6a sets lock bit to prevent changes to the secret. np read memory f0 read data from 1024-bit eeprom memory data field cc read data/generate crc c3 read data from 1024-bit eeprom memory data field and generate a crc value of the data read during the operation cc read all 65 read data from the all 5 pages of the eeprom memory data field read status aa read data from the 8-byte eeprom status data field cc write status 55 write data to the eeprom status data field. np write scratchpad 6c write data to the 8-byte scratchpad buffer read scratchpad 69 read data from the 8-byte scratchpad buffer copy scratchpad 48 write scratchpad data to eeprom data field. set overdrive 8b sets 1-wire interface timings to overdrive. np clear overdrive 8d sets 1-wire interface timings to standard. (factory default) np reset bb resets DS2704 (software por) cc key: cc  complete compatibility, np:  no programming pulse required on DS2704.
DS2704: 1280-bit eeprom with sha-1 authentication 16 of 18 table 8. guide to function command requirements command issue memory address issue 00h before read read/write time slots readback crc write challenge write: 64 compute mac yes read: up to 160 compute next secret clear/lock secret, set/clear overdrive read memory 16 bits: ta1, ta2 read: up to 1024 (data) up to 16 (crc) after cmd + ta2:ta1, end of page 3 read data/gen crc 16 bits: ta1, ta2 read: up to 1024 (data) up to 40 (crc) after cmd + ta2:ta1, end of each page read all 16 bits: ta1, ta2 read: up to 1280 (data) after cmd + ta2:ta1, end of page 4 read status 16 bits read: up to 64 (data) up to 16 (crc) after cmd + ta2:ta1, end of status field write status write: 8 write scratchpad 8 bits write: up to 64 read scratchpad 8 bits read: up to 64 copy scratchpad 16 bits: ta1, ta2 reset figure 7: compute mac function command 8 write 0 time slots up to 160 read time slots (read 20-byte mac) skip rom cmd compute mac cmd 1-wire reset presence pulse t sha wait for mac computation
DS2704: 1280-bit eeprom with sha-1 authentication 17 of 18 figure 8: compute next secret function command skip rom cmd compute next secret cmd 1-wire reset presence pulse t sha wait for mac computation wait for eeprom programming t eec figure 9: copy scra tchpad function command skip rom cmd copy scratchpad cmd 1-wire reset presence pulse wait for eeprom programming t eec 16 write time slots (ta1, ta2)
DS2704: 1280-bit eeprom with sha-1 authentication 18 of 18 figure 10: clear/lock secret, set/clear overdrive function commands skip rom cmd clear/lock secret cmd or set/clear overdrive cmd 1-wire reset presence pulse wait for eeprom copy time t eec package information (for the latest package outline information, go to www.maxim-ic.com/dallaspackinfo .)


▲Up To Search▲   

 
Price & Availability of DS2704

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X